package com.example.chat.agent.controller;


import com.example.chat.agent.service.AgentService;
import com.example.chat.common.utils.ResultUtil;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/agent")
public class AgentController {
    @Resource
    AgentService agentService;

    @PostMapping("/search")
    public ResultUtil<String> search(String question) {
        return ResultUtil.ok(agentService.search(question));
    }
}
